10ec5a35b13963b953d3c6a9d8321dcecf11fb3f,opennlp-tools/src/test/java/opennlp/tools/ml/naivebayes/NaiveBayesModelReadWriteTest.java,NaiveBayesModelReadWriteTest,testBinaryModelPersistence,#,36
Before Change
public class NaiveBayesModelReadWriteTest {
@Test
public void testBinaryModelPersistence() throws Exception {
NaiveBayesModel model = (NaiveBayesModel) new NaiveBayesTrainer().trainModel(new TwoPassDataIndexer(
NaiveBayesCorrectnessTest.createTrainingStream(), 1, false));
Path tempFile = Files.createTempFile("bnb-", ".bin");
File file = tempFile.toFile();
NaiveBayesModelWriter modelWriter = new BinaryNaiveBayesModelWriter(model, file);
After Change
@Test
public void testBinaryModelPersistence() throws Exception {
testDataIndexer.index(NaiveBayesCorrectnessTest.createTrainingStream());
NaiveBayesModel model = (NaiveBayesModel) new NaiveBayesTrainer().trainModel(testDataIndexer);
Path tempFile = Files.createTempFile("bnb-", ".bin");
File file = tempFile.toFile();